home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / utilities / 2.0 / defaulticon.doc < prev    next >
Text File  |  1995-03-17  |  10KB  |  271 lines

  1.  
  2.                       DefaultIcon V2.3  (28-Feb-91)
  3.                       -----------------------------
  4.  
  5.       An object-oriented tool for assigning icon images to file classes
  6.  
  7.                                    by
  8.  
  9.           Christian A. Weber, AMIcom Research, Zürich / Switzerland
  10.  
  11.  
  12.  
  13. Please mail bug reports or enhancement requests to:
  14. cbmehq!cbmswi!mighty!chris@cbmvax.commodore.com
  15.  
  16.  
  17. First some legal stuff..
  18.  
  19. THIS PROGRAM IS IN THE PUBLIC DOMAIN. IT MAY BE FREELY DISTRUBUTED
  20. FOR NON-COMMERCIAL PURPOSES ONLY.
  21.  
  22. THIS SOFTWARE IS PROVIDED "AS IS". NO REPRESENTATIONS OR WARRANTIES ARE
  23. MADE WITH RESPECT TO THE ACCURACY, RELIABILITY, OR OPERATION OF THIS
  24. SOFTWARE, AND ALL USE IS AT YOUR OWN RISK. THE AUTHOR ASSUMES NO
  25. RESPONSIBILITY OR LIABILITY WHATSOEVER WITH RESPECT TO YOUR USE OR
  26. INABILITY TO USE OF THIS SOFTWARE.
  27.  
  28.  
  29. WARNING
  30. -------
  31.  
  32. DefaultIcon works only with Kickstart 2.0 and above. If you run it under
  33. Kickstart 1.3, it will return immediately.
  34.  
  35.  
  36. ABOUT DefaultIcon
  37. -----------------
  38.  
  39. One of the new features of Workbench 2.0 is the "Show All Files" mode,
  40. which shows all files as icons, even if they don't have associated
  41. ".info"-files. Workbench has two default types of icons, one for the
  42. executable files (files which have the 'e' bit set, you can do this in
  43. the "Information" window), and another image for all other files.
  44.  
  45. But there are of course more different file types than just "executables"
  46. and "data files"; there are pictures, sound files, animations, source
  47. codes and many more, and you want to have different icons for them.
  48.  
  49. DefaultIcon lets you choose a default icon for every file class it knows,
  50. and you can add new file classes (will be explained later in detail).
  51. For every file class there must exist a corresponding "xxx.info" file which
  52. must be located in one of the directories ENVARC:Icons, or ENVARC:Sys.
  53.  
  54.  
  55. INSTALLATION
  56. ------------
  57.  
  58. 1)  Place the DefaultIcon program into the "WbStartup" drawer of your boot
  59.     partition (or Workbench disk if you have a floppy based system).
  60.  
  61. 2)  Copy the whole "Icons" drawer into the "Prefs/Env-Archive" drawer of
  62.     your boot partition. If the Env-Archive drawer is not visible in the
  63.     Prefs window, you have to select "Show all files" from the Workbench
  64.     menu to make it visible.
  65.  
  66. 3)  DefaultIcon needs the default icon images for disks, drawers, projects
  67.     and tools you have saved as "Default icons" with your IconEdit tool.
  68.     If you have not done this, use IconEdit to create these files by doing
  69.     the following:
  70.  
  71.     a) Load IconEdit. It is located in the "Tools" drawer of your Workbench.
  72.     b) Set the icon type to "Disk".
  73.     c) Select "New" from the "Project" menu, and click "Continue" on the
  74.        requester which shows up.
  75.     d) Select "Save As Default Icon".
  76.     e) Repeat steps b to d with the icon types "Drawer", "Tool" and "Project".
  77.     f) Quit IconEdit.
  78.  
  79. 4)  Reboot your Amiga. After startup, an icon named "Materializer"
  80.     will appear on the Workbench screen. Double-click on this icon for more
  81.     information or to quit the DefaultIcon program.
  82.  
  83.  
  84. USAGE OF THE PROGRAM
  85. --------------------
  86.  
  87. Place one or more icons on "DefaultIcon"'s icon.
  88.  
  89. If the icons are "fake icons", they are converted to real icons. This means
  90. that you can snapshot them, and that they appear also on Workbench 1.3.
  91.  
  92. The icon's images will be set to the default image of their class (disk,
  93. drawer, tool, or user-defined classes).
  94.  
  95. Tips:  - You can use this feature to convert the 1.3-look drawer icons to
  96.          the new 2.0 look.
  97.  
  98.        - If you want to delete a "Trashcan" from Workbench, drag it on
  99.          DefaultIcon. It will then be converted into a drawer, which you
  100.          can delete like any other drawers.
  101.  
  102.        - You should set the default tool of your xxx_def.info files to the
  103.          appropriate program. For text files you can use "More", for IFF
  104.          pictures you can use "ShowIFF".
  105.  
  106.  
  107. ADDING NEW FILE CLASSES
  108. -----------------------
  109.  
  110. When freshly installed, DefaultIcon knows about the following file types:
  111.  
  112. Class         Default Tool      Type
  113. -----         ------------      ----
  114.  
  115. IFFANIM       MoviePRO          IFF animations
  116. IFFILBM       ShowIFF           IFF pictures
  117. IFF8SVX       Play8SVX          IFF sampled sounds
  118. ARCHIVE       none              Files archived with Arc, Zoo, Zip or LHArc
  119. DISKARCHIVE   none              Disks archived with DMS, Warp or Zoom
  120. GIF           none              GIF-87 pictures
  121. SOUNDFXSONG   SoundFX:SoundFX   Songs generated with the "SoundFX" program
  122. C             More              C language source files
  123. H             More              C language header files
  124. BASIC         More              Basic programs
  125. TEXT          More              Text files
  126.  
  127. Example:
  128. To add the new file class 'IFF ANIM' (actually, this type is already known,
  129. but it should do for an example) do the following:
  130.  
  131. 1)  Draw an icon for this file class using IconEdit. Save the icon as
  132.     "ENVARC:Icons/def_IFFANIM.info".  ¹)
  133.     Save the icon again, now as "ENV:Icons/def_IFFANIM.info".
  134.     (Saving the icons twice is necessary because if you only saved it to
  135.     ENVARC, you would have to reboot your Amiga before the icon is
  136.     recognized by DefaultIcon. If you only saved it to ENV:, it would be
  137.     lost after the next reboot, since ENV: is assigned to RAM)
  138.  
  139. 2)  Let DefaultTool know about the new file class:
  140.     - Open your WbStartup drawer.
  141.     - Select DefaultIcon's icon in that drawer, and bring up the Information
  142.       window by pressing the right AMIGA key and the 'i' keys simultanously.
  143.     - Klick on the button labeled "New" to add a new tool type.
  144.     - Enter the following text (case is important!):
  145.  
  146.          CLASS ANIM = 0:'FORM' && 8:'ANIM'
  147.  
  148.     - Klick on the "Save" button
  149.     - Double-click "DefaultIcon"'s icon. The "Materializer" icon disappears.
  150.     - Double-click "DefaultIcon" again. The "Materializer" icon appears
  151.       again, and now it knows about IFF animations.
  152.  
  153. 3)  Test it by dragging some animation files on the "Materializer" icon. The
  154.     icons of the files should be converted to your previously drawn icon.
  155.  
  156. ---
  157. ¹)  You could also save it into the "ENVARC:Sys" drawer, but I don't know
  158.     whether user software is allowed to put files there, so I decided to
  159.     create the Icons drawer. However, the default system icons for tools,
  160.     drawers and projects are stored in the sys drawer.
  161.  
  162.  
  163. THE CLASS DEFINITION
  164. --------------------
  165.  
  166. You can define a file class in two different ways:
  167.  
  168. 1)  Define some magic values which appear in all files of this class.
  169.     To find out these values, examine some files of the same class (you can
  170.     use 'Type file OPT H') and find some values which are the same in all
  171.     files. The format of such a definition can have two formats.
  172.  
  173.     Format 1: All specified values must match
  174.  
  175.         CLASS <name> = <offset> : <value> { && <offset> : <value> }
  176.  
  177.     Format 2: One or more of the specified values must match
  178.  
  179.         CLASS <name> = <offset> : <value> { || <offset> : <value> }
  180.  
  181.     In both cases, the fields in curly braces can be repeated zero or more
  182.     times.
  183.  
  184.     Example:
  185.  
  186.     1> Type f-15.anim opt h
  187.     0000: 464F524D 000391B4 414E494D 464F524D    FORM...´ANIMFORM     
  188.     0010: 000006F8 494C424D 424D4844 00000014    ...øILBMBMHD....     
  189.     0020: 016000DC 00000000 01020100 00000607    .`.Ü............     
  190.     ...
  191.     1> Type Gymnast.anim opt h
  192.     0000: 464F524D 00098AB6 414E494D 464F524D    FORM...¶ANIMFORM     
  193.     0010: 00006634 494C424D 424D4844 00000014    ..f4ILBMBMHD....     
  194.     0020: 014000C8 00000000 06000100 00000A0B    .@.È............     
  195.     ...
  196.  
  197.     As you can see, some common values are 'FORM' at offset 0, and 'ANIM'
  198.     at offset 8. A class entry for this file type would be:
  199.  
  200.     CLASS IFFANIM = 0:'FORM' && 8:'ANIM'
  201.  
  202.  
  203. 2)  Define a pattern which the filename must match. All AmigaDOS patterns
  204.     are valid here, but you MUST specify everything in UPPERCASE because
  205.     the AmigaDOS pattern matching routines are case sensitive.
  206.     If you want to use something like *.C, you must have a tool which
  207.     enables the '*' pattern matching, such as StarBurst or Star. So it is
  208.     wise to use #?.C instead of *.C for portability.
  209.  
  210.  
  211. Some examples for valid class definitions:
  212.  
  213. CLASS IFFANIM     = 0:'FORM' && 8:'ANIM'
  214. CLASS IFFILBM     = 0:'FORM' && 8:'ILBM'
  215. CLASS IFF8SVX     = 0:'FORM' && 8:'8SVX'
  216. CLASS DISKARCHIVE = 0:'DMS!' || 0:'Warp' || 0:'ZOOM'
  217. CLASS ARCHIVE     = 0:1A08 || 0:'ZOO ' || 0:504B0304
  218. CLASS ARCHIVE     = 2:'-lh' && 6:'-'
  219. CLASS BASIC       = #?.BAS
  220. CLASS CSOURCE     = #?.C || 0:'#include' || 0:'/*'
  221. CLASS TEXT        = #?.TXT || README || #?.DOC
  222.  
  223. NOTE:  Due to my laziness it is not possible to mix || and && in one
  224.        class definition. If you wish to define such a class, you must
  225.        do it with two definitions:
  226.  
  227.        WRONG:    CLASS ARCHIVE = 0:'ZOO' || 2:'-lh' && 6:'-'
  228.  
  229.        RIGHT:    CLASS ARCHIVE = 0:'ZOO'
  230.                  CLASS ARCHIVE = 2:'-lh' && 6:'-'
  231.  
  232.  
  233. TOOL TYPES
  234. ----------
  235.  
  236. DefaultIcon understands several tool types. You can edit them using the
  237. "Show Information" command from the Workbench menu. Here's a list of the
  238. recognized tool types:
  239.  
  240. ICONXPOS        Specifies the x coordinate of DefaultIcon's AppIcon.
  241.                 Example: ICONXPOS=550
  242.  
  243. ICONYPOS        Specifies the y coordinate of DefaultIcon's AppIcon.
  244.                 Example: ICONYPOS=160
  245.  
  246. ICONNAME        Specifies the name which appears under DefaultIcon's AppIcon.
  247.                 Example: ICONNAME=Materializer
  248.  
  249. CLONESTACKSIZE  If this is set to Yes, every file which already has an icon
  250.                 keeps the old stack size for the new icon, instead of
  251.                 getting the stack size defined in the xxx_def.info files.
  252.                 Example: CLONESTACKSIZE=No
  253.  
  254. CLONETOOLTYPES  If this is set to Yes, every file which already has an icon
  255.                 keeps the old tool types for the new icon, instead of
  256.                 getting the tool types defined in the xxx_def.info files.
  257.                 Example: CLONETOOLTYPES=Yes
  258.  
  259. CLONEICONPOS    If this is set to Yes, every file which already has an icon
  260.                 keeps the old position for the new icon, instead of getting
  261.                 the position defined in the xxx_def.info files.
  262.                 Example: CLONEICONPOS=Yes
  263.  
  264.  
  265. BUGS
  266. ----
  267.  
  268. If you convert a drawer icon, the size of the drawer window will be set
  269. to the defaults, so you must open the drawer and snapshot it's window.
  270.  
  271.